home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Advisor / CD-ROM Advisor.iso / prodemo / pdymain.dir / 00004_Script_4 < prev    next >
Text File  |  1995-09-29  |  3KB  |  92 lines

  1. on enterFrame
  2.   global gMovieToPlay
  3.   global gIndexOfCurrentButton
  4.   global gMouseDownInButton  --TRUE means down was in a button...in case of rollout
  5.   global gIsMainButton, gIsSmallButton  --TRUE if a mouseDown in a main/small button
  6.   global gChannelForHighLights, gChannelForFreeFlash
  7.   global gFreeFlashTimerBase
  8.   global gSmallButtonsOn
  9.   
  10.   -- $$$ starts
  11.   global gCursorIsHand
  12.   put FALSE into gCursorIsHand
  13.   -- $$$ ends
  14.   
  15.   put the mouseH into hTemp
  16.   put the mouseV into vTemp
  17.   
  18.   -- if mouse is in a button and if last mouseDown was in it, then highlight it
  19.   if gMouseDownInButton then
  20.     if gIsMainButton then
  21.       put isPositionWithinMainButton (hTemp, vTemp) into iButtonTemp
  22.       if iButtonTemp = gIndexOfCurrentButton then
  23.         set the visible of sprite gChannelForHighLights to TRUE
  24.         updateStage
  25.       else
  26.         set the visible of sprite gChannelForHighLights to FALSE
  27.         updateStage
  28.       end if
  29.     else
  30.       if gSmallButtonsOn then
  31.         put isPositionWithinSmallButton (hTemp, vTemp) into iButtonTemp
  32.         if iButtonTemp = gIndexOfCurrentButton then
  33.           set the visible of sprite gChannelForHighLights to TRUE
  34.           updateStage
  35.         else
  36.           set the visible of sprite gChannelForHighLights to FALSE
  37.           updateStage
  38.         end if
  39.       end if
  40.     end if
  41.   else
  42.     -- the mouse was not down in a button, so change cursor if it's over a button
  43.     if (isPositionWithinMainButton (hTemp, vTemp) > 0) or (isPositionWithinSmallButton (hTemp, vTemp) > 0) then
  44.       -- $$$ starts
  45.       if not gCursorIsHand then
  46.         cursor [9, 10]
  47.         put TRUE into gCursorIsHand
  48.       end if
  49.     else
  50.       cursor -1
  51.       put FALSE into gCursorIsHand
  52.     end if
  53.   end if
  54.   
  55.   --if the small buttons are on, then flash (blink) the free button
  56.   
  57.   if gSmallButtonsOn then
  58.     put "gSmallButtonsOn =", gSmallButtonsOn
  59.     put (the timer - gFreeFlashTimerBase) into timeDeltaTemp
  60.     
  61.     --put "the timer =", the timer, "   gFreeFlashTimerBase =", gFreeFlashTimerBase, "   timeDeltaTemp =", timeDeltaTemp
  62.     
  63.     if (timeDeltaTemp > 100) and (timeDeltaTemp <= 150)then
  64.       set the visible of sprite gChannelForFreeFlash to TRUE
  65.     else
  66.       if (timeDeltaTemp > 150) then
  67.         set the visible of sprite gChannelForFreeFlash to FALSE
  68.         put the timer into gFreeFlashTimerBase
  69.       end if
  70.     end if
  71.   end if
  72.   
  73. end enterFrame
  74.  
  75. on exitFrame
  76.   global gNextLabel
  77.   global gIsMainButton, gIsSmallButton
  78.   global gAnisForMainButtons, gIndexOfCurrentButton
  79.   global gMovieToPlay
  80.   
  81.   -- $$$
  82.   global gCursorIsHand
  83.   
  84.   if gMovieToPlay then
  85.     cursor 4  -- watch cursor
  86.     put FALSE into gCursorIsHand
  87.     play movie getAt(gAnisForMainButtons, gIndexOfCurrentButton)
  88.   end if
  89.   
  90.   go to frame gNextLabel
  91. end exitFrame
  92.